import * as proxy from '../proxy';
import ServiceBase from '../base';

const GET_PROJECT = '/projects';
const GET_FILES = '/file';
const GET_VERSION = '/versions';

class DownloadService extends ServiceBase {
    downloadFile = (options) => {
        let promise = super.get({
            url:
                GET_PROJECT +
                `/${options.projectId}` +
                GET_FILES +
                `/${options.detailId}` +
                GET_VERSION +
                `/${options.activeVersion}`,
        });
        return proxy.httpResultProxy(promise);
    };
}

export {DownloadService};
